package com.gangquan360.smartadmin.module.region;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.gangquan360.smartadmin.common.anno.NoNeedLogin;
import com.gangquan360.smartadmin.common.domain.ResponseDTO;
import com.gangquan360.smartadmin.constant.SwaggerTagConst;
import com.gangquan360.smartadmin.module.region.domain.RegionDTO;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api(tags = { SwaggerTagConst.Admin.REGION })
@RestController
public class RegionController {

	@Autowired
	private RegionService regionService;

	
	@ApiOperation("获取地区分类树")
	@GetMapping("/region/tree")
	@NoNeedLogin
	public ResponseDTO<List<RegionDTO>> getRegionTree() {
		return regionService.getRegionTree();
	}

}
